package com.ruoyi.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.BaseArea;
import com.ruoyi.service.IBaseAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/webshop/baseArea")
public class BaseAreaController {
    @Autowired
    private IBaseAreaService baseAreaService;

    // 全查
    @GetMapping("/list")
    public List<BaseArea> list(){
        List<BaseArea> list = baseAreaService.list();
        return list;
    }
    @GetMapping("/listBaseAreaCascader")
    public AjaxResult listBaseAreaCascader(){
        List<Map<String, Object>> list = baseAreaService.listBaseAreaCascader();
        return AjaxResult.success(list);
    }

}
